import { generateUUID } from "@/utils";

/**
 * 默认主题
 */
export const defaultThemeConfig = (): ThemeConfigType => {
  return {
    title: "项目部署器",
    isIsDark: false,
    isTerminalDark: true,
    termFontSize: 12,
    primary: "#17ac9b",
    // TTS播报
    TTSPlay: true,
    // 讲一个笑话
    quotation: "https://api.vvhan.com/api/text/joke?type=json",
    termTheme: {
      foreground: "#2c3e50",
      background: "#f4fefd",
      cursor: "rgba(0, 0, 0, .4)",
      selection: "rgba(0, 0, 0, 0.3)",
      selectionBackground: "rgba(0, 0, 0, 0.1)",
      black: "#000000",
      red: "#e83030",
      brightRed: "#e83030",
      green: "#42b983",
      brightGreen: "#42b983",
      brightYellow: "#ea6e00",
      yellow: "#ea6e00",
      magenta: "#e83030",
      brightMagenta: "#e83030",
      cyan: "#03c2e6",
      brightBlue: "#03c2e6",
      brightCyan: "#03c2e6",
      blue: "#03c2e6",
      white: "#d0d0d0",
      brightBlack: "#808080",
      brightWhite: "#ffffff",
    },
    termThemeDark: {
      foreground: "#fff",
      background: "#142727",
      cursor: "rgba(255, 255, 255, .4)",
      selection: "rgba(255, 255, 255, 0.3)",
      selectionBackground: "rgba(255, 255, 255, 0.2)",
      black: "#000000",
      red: "#e83030",
      brightRed: "#e83030",
      green: "#42b983",
      brightGreen: "#42b983",
      brightYellow: "#ea6e00",
      yellow: "#ea6e00",
      magenta: "#e83030",
      brightMagenta: "#e83030",
      cyan: "#03c2e6",
      brightBlue: "#03c2e6",
      brightCyan: "#03c2e6",
      blue: "#03c2e6",
      white: "#d0d0d0",
      brightBlack: "#808080",
      brightWhite: "#ffffff",
    },
  };
};

/**
 * 默认ftps
 */
export const defaultFtpStorage = (): DeployFtpType[] => {
  return [
    {
      title: "成都 147（内网）",
      id: "test_1111",
      host: "192.168.0.147",
      port: 22,
      username: "root",
      password: "hrz81788178.com",
      system: "linux",
    },
    {
      title: "成都 160（Zero）",
      id: "test_2222",
      host: "192.168.196.160",
      port: 22,
      username: "root",
      password: "hrz81788178.com",
      system: "linux",
    },
  ];
};

/**
 * 默认web
 */
export const defaultWebStorage = (): WebType[] => {
  return [
    {
      id: generateUUID(),
      title: "成都147（内网）",
      ftp_id: "test_1111",
      target: "/home/mis/",
      source: "D:\\projects\\MisWWW\\vue-element-plus\\dist_mis",
      exclude: [],
      writes: [],
      filename: "www",
    },
    {
      id: generateUUID(),
      title: "成都160（Zero）",
      ftp_id: "test_2222",
      target: "/home/mis/",
      source: "D:\\projects\\MisWWW\\vue-element-plus\\dist_mis",
      exclude: [],
      writes: [],
      filename: "www",
    },
  ];
};

/**
 * 默认server
 */
export const defaultServerStorage = (): WebType[] => {
  return [
    {
      id: generateUUID(),
      title: "成都147-base",
      ftp_id: "test_1111",
      target: "/home/mis/api/",
      source: "D:\\projects\\MisWWW\\vue-element-plus\\dist_mis",
      exclude: [
        "00_Logs",
        "ERP",
        "runtimes",
        "wwwroot",
        "appsettings.json",
        ".env",
      ],
      writes: [],
      filename: "misbase",
    },
  ];
};

/**
 * 默认running
 */
export const defaultRunningStorage = (): RunType[] => {
  return [
    {
      id: generateUUID(),
      title: "成都147-base",
      source: "D:projectsCRMsvrtestApi.Crm.Activity\binRelease\net5.0publish",
      time: 0,
      time_string: "",
      filename: "api_base.dll",
    },
  ];
};

/**
 * 默认TagView
 */
export const defaultTagViewStorage = (): WebRouteRaw[] => {
  return [
    {
      id: "/home",
      title: "首页",
      name: "home",
      path: "/home",
      query: {},
      params: {},
    },
  ];
};

/**
 * 默认AudioHistory
 */
export const defaultAudioHistoryStorage = (): AudioType[] => {
  return [
    {
      id: 1330348068,
      name: "起风了",
      auther: "买辣椒也用券",
      picUrl:
        "http://p2.music.126.net/diGAyEmpymX8G7JcnElncQ==/109951163699673355.jpg",
      url: "https://music.163.com/song/media/outer/url?id=1330348068",
      sort: "热歌榜",
    },
  ];
};
